import { AbstractInitHandler } from './AbstractInitHandler';
import { Bootstrap } from '..';

/**
 * Обработчик пост инициализации роутера.
 */
export class AfterBootstrapCallHandler extends AbstractInitHandler {
  async handle(bootstrap: Bootstrap): Promise<Bootstrap> {
    for (const handler of bootstrap.afterBootstrapInit) {
      await handler(bootstrap);
    }

    return await super.handle(bootstrap);
  }
}
